#ifndef ABSTRACTCARD_H
#define ABSTRACTCARD_H

#include <QObject>
#include <QVector>
#include <QPixmap>
#include <QDomElement>
#include <QMetaProperty>
#include <QGraphicsItem>

#include "reservedwords.h"

typedef QString ManaDefinitionType;

class AbstractCard : public QObject
{
    Q_OBJECT
public:
    enum CardState {state_InPool, state_InHand, state_InGame, state_InGrave, state_OutGame} ;

    explicit AbstractCard(QDomDocument *xmlDefinition);
    explicit AbstractCard(QString xmlDefinition);

    virtual QVector<ManaDefinitionType> GetCardColor();
    virtual void SetCardColor(QVector<ManaDefinitionType>);
    virtual void AddCardColor(ManaDefinitionType);

    virtual QString toXmlDefinition();

    QString getCardName();
    void setCardName(QString);
    QString getCardDescription();
    void setCardDescription(QString);
    QString getCardType();
    void setCardType(QString);
    QString getCardSubType();
    void setCardSubType(QString);

    CardState getCardState();
    void setCardState(CardState state);

    Q_PROPERTY(QString CardName READ getCardName() WRITE setCardName());
    Q_PROPERTY(QString CardDescription READ getCardDescription() WRITE setCardDescription());
    Q_PROPERTY(QString CardType READ getCardType() WRITE setCardType());
    Q_PROPERTY(QString CardSubType READ getCardSubType() WRITE setCardSubType());

private:
    QVector<ManaDefinitionType> m_CardColor;
    bool m_tapped;
    QPixmap *icon;
    QString m_XmlDefinition;
    CardState m_CardState;

    QString m_CardName;
    QString m_CardDescription;
    QString m_CardType;
    QString m_CardSubType;
    QVector<QString> m_CharacteristicsList;

    QVector<QString> m_Properties;

protected:
    virtual void convertFromXML(QDomDocument *, QVector<QString> );

signals:

public slots:

};

#endif // ABSTRACTCARD_H
